package com.smgeek.gkrpc.server;

import com.smgeek.gkrpc.ReflectionUtil;
import com.smgeek.gkrpc.Request;

/**
 * 调用具体服务
 */
public class ServiceInvoker {
    public Object invoke(ServiceInstance service, Request request) {
        return ReflectionUtil.invoke(
                service.getTarget(),
                service.getMethod(),
                request.getParameters());
    }
}
